package com.neusoft.jxc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.neusoft.jxc.bean.Pager;
import com.neusoft.jxc.bean.PssException;
import com.neusoft.jxc.mapper.SuperDao;
import com.neusoft.jxc.service.SuperService;

/**
 * 
 * @author chens
 *
 * @param <T>
 */
public abstract class AbstractServiceImpl<T> implements SuperService<T> {

	@Autowired
	private SuperDao<T> superDao;

	@Override
	public List<T> findList(Pager<T> pager) throws PssException {

		return superDao.findList(pager);
	}

	@Override
	public int findTotal(Pager<T> pager) throws PssException {

		return superDao.findTotal(pager);
	}

	@Override
	public List<T> findAll() {

		return superDao.findAll();
	}

	@Override
	public boolean add(T param) throws PssException {

		return superDao.add(param);
	}

	@Override
	public boolean edit(T param) throws PssException {

		return superDao.edit(param);
	}

	@Override
	public boolean deleteById(T param) throws PssException {

		return superDao.deleteById(param);
	}

}
